
/*
规则定义
 */
const mongoose = require('mongoose');
var mongoosePaginate = require('mongoose-paginate');
var schema = new mongoose.Schema({ 
    name:String,
    comment:String,
    date:{type:Date,default:Date.now},
    desc:String
});

schema.plugin(mongoosePaginate);
module.exports  = mongoose.model('comment', schema); // Model.paginate()